﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="view_sub_trackback.ascx.cs" Inherits="vboard_component_board_template_default_view_sub_trackback" %>

<div class="view_sub_trackback">

	<script type="text/javascript">
		function view_sub_trackback_CopyUrl(textbox)
		{
			if (VWebGlobal_WebBrowserInfo.IsIE)
			{
				window.clipboardData.setData('Text', textbox.value);

				alert('<%= GetLocalResourceObject("UrlCopy_Result").ToString() %>');
			}
		}
	</script>

	<asp:UpdatePanel ID="TrackbackPostUpdatePanel" runat="server" UpdateMode="Conditional">
		<ContentTemplate>
			<div class="CommonBox">
				<div class="Header">
					<%= GetLocalResourceObject("Trackback_Label").ToString() %>
					<asp:Literal ID="TrackbackPostCountLiteral" runat="server" />
				</div>
				<div class="Content">
					<asp:TextBox ID="TrackbackUrlTextBox" runat="server" ReadOnly="true" Width="98%" onclick="view_sub_trackback_CopyUrl(this);" />
					<asp:Literal ID="TrackbackUrlCopyDescription" runat="server" Text="<%$ Resources:UrlCopy_Description %>" />
				</div>

				<asp:Repeater ID="TrackbackRepeater" runat="server" 
					onitemdatabound="TrackbackRepeater_ItemDataBound" 
					onitemcommand="TrackbackRepeater_ItemCommand">
					<HeaderTemplate>
						<div class="Content">
							<input type="button" value="<%# GetLocalResourceObject("ShowButton_Text").ToString() %>" onclick="javascript:document.getElementById('TrackBackList').style.display = 'block';" />
							<input type="button" value="<%# GetLocalResourceObject("HideButton_Text").ToString() %>" onclick="javascript:document.getElementById('TrackBackList').style.display = 'none';" />
							<div id="TrackBackList">
								<asp:Button ID="RemoveAllButton" runat="server" Text="<%$ Resources:RemoveAllButton_Text %>" CommandName="RemoveAll" OnClientClick="<%$ Resources:VGlobalResources, General_Script_RemoveConfirm %>" />
					</HeaderTemplate>
					<ItemTemplate>
						<div class="Post">
							<div>
								<%# String.Format(GetLocalResourceObject("BlogNameFormat").ToString(), Eval("Url").ToString().Replace("&", "&amp;"), Eval("BlogName"), Eval("RegistrationDate")) %>
								<asp:Button ID="RemoveButton" runat="server" Text="<%$ Resources:RemoveButton_Text %>" CommandName="Remove" OnClientClick="<%$ Resources:VGlobalResources, General_Script_RemoveConfirm %>" />
							</div>
							<div><%# String.Format(GetLocalResourceObject("TitleFormat").ToString(), Eval("Title")) %></div>
							<div><%# Server.HtmlEncode(String.Format(GetLocalResourceObject("ExcerptFormat").ToString(), Eval("Excerpt"))) %></div>
						</div>
					</ItemTemplate>
					<SeparatorTemplate><div class="PostSeparator"></div></SeparatorTemplate>
					<FooterTemplate></div></div></FooterTemplate>
				</asp:Repeater>
			</div>
		</ContentTemplate>
	</asp:UpdatePanel>
</div>